package com.softserveinc.interactive_board.commons;

import java.util.ArrayList;
import java.util.List;

import com.softserveinc.interactive_board.domain.Slide;
import com.softserveinc.interactive_board.domain.Presentation;

public class CheckedSlidesList {
	private List<CheckedSlideContainer> list = new ArrayList<CheckedSlideContainer>();

	public List<Slide> getCheckedPictures() {
		List<Slide> buff = new ArrayList<Slide>();
		for (CheckedSlideContainer i : this.list)
			if (i.isChecked())
				buff.add(i.getSlide());
		return buff;
	}

	public CheckedSlidesList(List<Slide> list) {
		for (Slide u : list)
			this.list.add(new CheckedSlideContainer(u, false));
	}

	public CheckedSlidesList(Presentation pres) {
		this(pres.getSlides());
	}

	public CheckedSlidesList() {
		this.list = new ArrayList<CheckedSlideContainer>();
	}

	public List<CheckedSlideContainer> getList() {
		return list;
	}

	public void setList(List<CheckedSlideContainer> list) {
		this.list = list;
	}

}
